/*
 * Copyright 2013-2018 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.echartsdata.demos.web;

import com.echartsdata.Entityimp.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;


/**
 * @author <a href="mailto:chenxilzx1@gmail.com">theonefx</a>
 */
@Controller
public class BasicController {


    // http://127.0.0.1:8080/index
    //跳转首页
    @RequestMapping("/index")
    public String html() {
        return "index";
    }
    //接口数据Data1
    @Resource

    private Data1Mapperimp data1Mapperimp;
    //@RequestMapping("/data1")
    @GetMapping("/data1")
    @ResponseBody
    public String data1() {
         return  data1Mapperimp.getData1();
    }
    //接口数据Data1
    @Resource
    private Data2Mapperimp data2Mapperimp;
    //@RequestMapping("/data2")
    @GetMapping("/data2")
    @ResponseBody
    public String data2() {
        return  data2Mapperimp.Get_list();
    }

    //大屏数据接口
    @Resource
    private BigdataMapperimp bigdataMapperimp;
    @GetMapping("/Bigdata")
    @ResponseBody
    public String screen() {
        return bigdataMapperimp.get_sum_cont();
    }

    //政策信息指南
    @Resource
    private InformationMapperimp Information;
    @GetMapping("/information")
    @ResponseBody
    public String policy() {
        return Information.get_information();
    }

    //政策解读
    @Resource
    private PolicyMapperimp Policy;
    @GetMapping("/Policy")
    @ResponseBody
    public String analysis() {
        return Policy.get_list();
    }
    //忘仙谷游客占比
    @Resource
    private TouristMapperimp touristMapperimp;
    @GetMapping("/Tourist")
    @ResponseBody
    public String visitor() {
       return touristMapperimp.get_list();

    }
    //问题反馈占比
    @Resource
    private ProblemMapperimp problemMapperimp;
    @GetMapping("/Problem")
    @ResponseBody
    public String feedback() {
        return problemMapperimp.get_problem();
    }

    //职业
    @Resource
    private CareerMapperimp careerMapperimp;
    @GetMapping("/Career")
    @ResponseBody
    public String Career() {
        return careerMapperimp.get_list();
    }

    //信息来源
    @Resource
    private BaseInfoMapperimp baseInfoMapperimp;
    @GetMapping("/baseInfo")
    @ResponseBody
    public String BaseInfo() {
        return baseInfoMapperimp.get_baseInfo();
    }
    //内容占比
    @Resource
    private NeirongMapperimp neirongMapperimp;
    @GetMapping("/neirong")
    @ResponseBody
    public String content() {
       return neirongMapperimp.get_list();
    }

    //舆论
    @Resource
    private OpinionMapperimp opinionMapperimp;
    @GetMapping("/opinion")
    @ResponseBody
    public String opinion() {
        return opinionMapperimp.get_list();
    }

    //就业
    @Resource
    private Employmentimp employmentimp;
    @GetMapping("/Employment")
    @ResponseBody
    public String Employment() {
        return employmentimp.get_list();
    }
}
